//Tuesday, October 27 2009
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class Underprimes
{
public:
	int howMany(int A, int B)
	{
		int ret = 0;
		for(int i=A; i<=B; i++)
			if(isprime(count(i)))
			{
				ret++;
				cout << i << ", " << count(i) << endl;
			}
		return ret;
	}
	bool isprime(int A)
	{
		if(A == 1) return false;
		for(int i=2; i<=sqrt(A); i++)
			if(A%i == 0) return false;
		return true;
	}
	int count(int A)
	{
		if(isprime(A)) return 1;
		for(int i=2; i<=sqrt(A); i++)
		{
			if(isprime(i) && A%i==0)
				return 1+count(A/i);
		}
	}
};
